﻿@using BlogEngine.Core;
@using System.Web.Optimization;
@{
    App_Code.WebUtils.CheckRightsForAdminPagesPages(false);
    string loginUrl = Href(Utils.RelativeWebRoot + "Account/login.aspx");
}
<!DOCTYPE html>
<html>
    <head>
        <title>@Page.Title</title>
        <link rel="shortcut icon" href="@Href(Utils.ApplicationRelativeWebRoot + "pics/blogengine.ico")" type="image/x-icon" />
        @if (BlogSettings.Instance.EnableOptimization)
        {
        <link href="@BundleTable.Bundles.ResolveBundleUrl("~/admin/css")" rel="stylesheet" type="text/css" />
        }
        else
        {
        if (Utils.GetDefaultCulture().TextInfo.IsRightToLeft)
        {
        <link href="@string.Format("{0}admin/style-rtl.css", Utils.ApplicationRelativeWebRoot)" rel="stylesheet" type="text/css" />
        }
        else
        {
        <link href="@string.Format("{0}admin/style.css", Utils.ApplicationRelativeWebRoot)" rel="stylesheet" type="text/css" />
        }
        <link href="@string.Format("{0}admin/colorbox.css", Utils.ApplicationRelativeWebRoot)" rel="stylesheet" type="text/css" />
        <link href="@string.Format("{0}admin/tipsy.css", Utils.ApplicationRelativeWebRoot)" rel="stylesheet" type="text/css" />
        }     
 
    </head>
    <body>
        <script type="text/javascript">
            var SiteVars = {
                ApplicationRelativeWebRoot: '@Utils.ApplicationRelativeWebRoot',
                RelativeWebRoot: '@Utils.RelativeWebRoot',
                BlogInstanceId: '@Blog.CurrentInstance.Id'
            };
        </script> 
        <script type="text/javascript" src="admin.res.axd"></script>
        @if (BlogSettings.Instance.EnableOptimization)
        {
        <script type="text/javascript" src="@BundleTable.Bundles.ResolveBundleUrl("~/Scripts/adminjs")"></script> 
        }
        else
        {
        <script type="text/javascript" src="@string.Format("{0}Scripts/jquery-1.8.2.min.js", Utils.ApplicationRelativeWebRoot)"></script> 
        <script type="text/javascript" src="@string.Format("{0}Scripts/jquery.cookie.js", Utils.ApplicationRelativeWebRoot)"></script> 
        <script type="text/javascript" src="@string.Format("{0}Scripts/jquery.validate.min.js", Utils.ApplicationRelativeWebRoot)"></script> 
        <script type="text/javascript" src="@string.Format("{0}Scripts/jquery-jtemplates.min.js", Utils.ApplicationRelativeWebRoot)"></script> 
        <script type="text/javascript" src="@string.Format("{0}Scripts/json2.min.js", Utils.ApplicationRelativeWebRoot)"></script> 
        <script type="text/javascript" src="@string.Format("{0}admin/admin.js", Utils.ApplicationRelativeWebRoot)"></script> 
        }    
        <div class="page">
            <form id="form1">

                <div id="StatusBox">
                    <div id="AdminStatus" runat="server"></div>
                </div>

                <div class="header">
                    <div class="be-logo">
                        <span>@BlogEngine.Core.BlogSettings.Instance.Name @Resources.labels.admin</span>
                    </div>                                  
                    <div class="toolbox">
                        @Resources.labels.welcome&nbsp;
                        @if (AuthorProfile.GetProfile(Security.CurrentUser.Identity.Name) == null)
                        { @Security.CurrentUser.Identity.Name }
                        else
                        { @AuthorProfile.GetProfile(Security.CurrentUser.Identity.Name).DisplayName }
                        | <a href="@Href(Utils.RelativeWebRoot + "admin/Users/Profile.aspx?id=")@Security.CurrentUser.Identity.Name">@Resources.labels.myProfile</a>
                        | <a href="@BlogEngine.Core.Utils.RelativeWebRoot">@Resources.labels.goToFrontPage</a>
                        | <span><a href="@Href(Utils.RelativeWebRoot + "Account/login.aspx?logoff")">@Resources.labels.logoff</a></span>
                    </div>                                 
                </div>

                <div class="tabs toprounded">
                    @RenderPage("_menu.cshtml")
                    <div id="recyclebin"><a class="empty" href="@(Utils.RelativeWebRoot)admin/Trash.aspx"></a></div>
                </div>

                <div class="clear"></div>
                @RenderBody()

                <div id="footer">
                    <a href="http://dotnetblogengine.net">BlogEngine.NET @BlogEngine.Core.BlogSettings.Instance.Version()</a> | 
                    <a id="donate" runat="server" href="http://dotnetblogengine.net/Donate.aspx" target="_new">@Resources.labels.makeDonation</a>          
                </div>

            </form>
        </div>
    </body>
</html>
